import request from '../../utils/request'

const api_order = '/api/order/order'


//查询订单分页
export function getOrderInfoPage(pageNum, pageSize, data) {
    return request({
        url: `${api_order}/auth/page/${pageNum}/${pageSize}`,
        method: 'get',
        params: data
    })
}


//查询订单状态
export function getOrderInfoStatusList() {
    return request({
        url: `${api_order}/auth/status`,
        method: 'get',
    })
}


//查询订单详情
export function getOrderInfoById(orderId) {
    return request({
        url: `${api_order}/get/${orderId}`,
        method: 'get',
    })
}



//生成订单
export function saveOrders(scheduleId,patientId) {
    return request({
        url: `${api_order}/auth/add/${scheduleId}/${patientId}`,
        method: 'get',
    })
}



//取消订单
export function cancelOrder(orderId) {
    return request({
        url: `${api_order}/auth/cacel/${orderId}`,
        method: 'get',
    })
}



//获取订单统计数据
export function getOrderCount(data) {
    return request({
        url: `${api_order}/inner/count`,
        method: 'post',
        data
    })
}